package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 卫星节点组
 * @author zhangxa
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "HEALTH.tb_satellite_node")
@EqualsAndHashCode(callSuper = true)
public class SatelliteNode extends BaseModel<Long> {

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "pid")
    private Long pid;

    @ApiModelProperty(value = "卫星id")
    @Column(name = "satellite_id")
    private Long satelliteId;

    @ApiModelProperty(value = "新增卫星id")
    @Column(name = "satellite_new_id")
    private String satelliteNewId;

    @Column(name = "code")
    @ApiModelProperty(value = "代号")
    private String code;

    @Column(name = "name")
    @ApiModelProperty(value = "名称")
    private String name;

    @Transient
    private String xing;

    /**
     * 拓扑图用
     */
    @Transient
    private String label;

    @Column(name = "color")
    @ApiModelProperty(value = "颜色")
    private String color;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Transient
    private Long from;

    @Override
    public Long idValue() {
        return id;
    }
}
